<%@ Page Title="Information Management System" Language="C#" MasterPageFile="~/Main.Master"
    AutoEventWireup="true" CodeBehind="TemplateList.aspx.cs" Inherits="CARMS.AdminTemplate.TemplateList" %>

<%@ Register Src="~/Controls/GridPager.ascx" TagName="GridPager" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/ConditionControl.ascx" TagName="ConditionControl" TagPrefix="ucc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script>
 
     
 
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="divSeperatorH10">
            </div>
            <asp:Panel ID="Panel2" runat="Server">
                <asp:Button runat="server" ID="btnCreateNew" Text="Create New" OnClick="btnCreateNew_Click"
                    SkinID="Button120" />
            </asp:Panel>
            <asp:Panel ID="Panel1" runat="server" DefaultButton="btnSearchTemplate">
                <table border="0" cellpadding="0" cellspacing="5">
                    <tr>
                        <td>
                            <ucc:ConditionControl runat="server" ID="controlCondition" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnSearchTemplate" runat="server" Text="Search" OnClick="btnSearchTemplate_Click"
                                SkinID="Button90" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="Button1" runat="server" Text="View All" OnClick="btnViewAll_Click"
                                SkinID="Button90" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <br />
            <fieldset>
                <legend>Template List</legend>
                <vs:GridView ID="gridTemplate" runat="server" AutoGenerateColumns="false" OnRowDataBound="gridTemplate_RowDataBound"
                    OnRowCommand="gridTemplate_RowCommand"   AllowSorting="True"              DataKeyNames="TemplateID">
                    <Columns>
                        <asp:TemplateField HeaderText="Edit">
                            <ItemTemplate>
                                <asp:ImageButton ID="btnView" runat="server" SkinID="Modify" CommandName="ViewItem"
                                    CommandArgument='<%#Eval("TemplateID") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <vs:TemplateField HeaderText="Template ID" SortExpression="TemplateID">
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='<%#Eval("TemplateID") %>'>
                                    <%#Eval("TemplateID")%>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Template Name" SortExpression="TemplateName">
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='<%#Eval("TemplateName") %>'>
                                    <%#Eval("TemplateName") %>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Template Subject" SortExpression="TemplateSubject">
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='<%#Eval("TemplateSubject") %>'>
                                    <%#Eval("TemplateSubject") %>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                        <vs:TemplateField HeaderText="Remark">
                            <ItemTemplate>
                                <div class="divHidden" style="width: 100px;" title='<%#Eval("Remark") %>'>
                                    <%#Eval("Remark") %>
                                </div>
                            </ItemTemplate>
                        </vs:TemplateField>
                    </Columns>
                </vs:GridView>
                <uc1:GridPager ID="PageQueryAdapter1" runat="server" OnPerformGetCondition="PageQueryAdapter1_PerformGetCondition"
                    OnPerformGetRecordCount="PageQueryAdapter1_PerformGetRecordCount" OnPerformGetPageData="PageQueryAdapter1_PerformGetPageData"
                    TargetControlID="gridTemplate" PageSize="100" />
            </fieldset>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
